/*复用MongoDB中的数据结构*/
/*引入依赖*/
const mongoose = require("mongoose");
mongoose.connect("mongodb://localhost:27017/1807");
/*生成Schema*/
const userSchema = new mongoose.Schema({
	username:String,
	password:String,
	email:String
});
const positionSchema = new mongoose.Schema({
	position:String,
	company:String,
	exprience:String,
	type:String,
	address:String,
	salary:Number,
	logo:String
});
//生成model
//生成用户model
const User = mongoose.model("user",userSchema);
//生成职位model
const Position = mongoose.model("position",positionSchema);
//将用户model与职位model导出使用
module.exports= {User,Position};